An NFC technology evolves from consolidation of a radio frequency identification (English: Radio Frequency Identification, RFID) technology and an interworking technology. By using the NFC technology, functions such as an induction card reader, card emulation, and point-to-point communication can be consolidated on a single chip, and identification and data exchange between a device and a compatible device can be performed within a short distance.
In a card emulation mode, a card emulation terminal (such as a mobile phone supporting the card emulation mode) is emulated as a whole as a card, to be accessed by a card reader terminal. A structure of the card emulation terminal includes a near field communication controller (English: Near Field Communication Controller, NFCC) and at least one near field communication execution environment (English: Near Field Communication Execution Environment, NFCEE). The NFCC is responsible for data transmission to and from the card reader terminal by using a radio frequency (English: Radio Frequency, RF) interface, and the NFCEE is a specific entity configured to provide an execution environment to a contactless application.
When the NFCC is connected to one NFCEE, a communications technology that is the same as an NFC communications technology type supported by the NFCEE is configured for the NFCC. When the card reader terminal selects any one of communication types supported by the NFCC for communication, the selected communication type matches a type of a communication channel between the NFCC and the NFCEE. For example, as shown in FIG. 1, the NFC communications technology type supported by the NFCEE is Type A, and then the NFC communications technology type supported by and configured for the NFCC is also Type A. In this case, the type, namely, PIPE A, of the communication channel between the NFCC and the NFCEE matches Type A, and the card reader terminal selects Type A for data frame transmission to and from the NFCC. The communication channel between the NFCC and the NFCEE matches Type A selected by the card reader terminal, and therefore communication is normal.
When the NFCC is connected to two NFCEEs, a communications technology that is the same as an NFC communications technology type supported by both of the two NFCEEs is configured for the NFCC. When the card reader terminal selects any one of communication types supported by the NFCC for communication, the selected communication type may not match a type of a communication channel between the NFCC and an NFCEE, consequently causing a communication failure. For example, as shown in FIG. 2, an NFCEE 01 supports Type A and an NFCEE 02 supports Type A and Type B, and then NFC communications technology types supported by and configured for the NFCC are Type A and Type B. In addition, in this case, a communication channel between the NFCC and the NFCEE 01 is PIPE A matching Type A, and communication channels between the NFCC and the NFCEE 02 are PIPE A matching Type A and PIPE B matching Type B. When the card reader terminal selects Type B for data frame transmission to and from the NFCC, if the NFCC selects the NFCEE 01, a communication failure is caused because the communication channel between the NFCC and the NFCEE 01 does not match Type B selected by the card reader terminal.